package com.zt.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 优惠券视图对象
 */
@Data
public class CouponVO {

    private Integer id;

    private String title;

    private String description;

    private Integer type;

    private String typeName;

    private BigDecimal amount;

    private BigDecimal minSpend;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    private Integer status;

    private String statusName;

    /**
     * 总发放数量
     */
    private Integer totalCount;

    /**
     * 已使用数量
     */
    private Integer usedCount;

    /**
     * 剩余数量
     */
    private Integer remainingCount;

    /**
     * 每人限领数量
     */
    private Integer limitPerUser;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updatedAt;

    /**
     * 是否即将过期（24小时内）
     */
    private Boolean expiringSoon;

    /**
     * 使用率
     */
    private Double usageRate;
}
